package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.CarBean;
import com.molichuxing.services.infrastructure.bean.FenceExceptionBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface FenceExceptionBeanMapper extends RootMapper<FenceExceptionBean> {
    /**
     *
     * @param record
     * @return
     */
    int insert(FenceExceptionBean record);

    /**
     *
     * @param id
     * @return
     */
    FenceExceptionBean selectByPrimaryKey(Integer id);


    /**
     *
     * @param carId
     * @return
     */
    FenceExceptionBean selectByCarId(@Param("carId") Integer carId);

    /**
     *
     * @param carIdList
     * @return
     */
    int delete(@Param("carIdList") List<Integer> carIdList);

    /**
     * 根据条件分页查询count
     * @param map
     * @return
     */
    public int getFenceExceptionPageCount(@Param("param") Map<String, Object> map);


    /**
     * 根据条件分页查询结果
     * @param map
     * @param pageNum
     * @param pageSize
     * @return
     */
    public List<FenceExceptionBean> getFenceExceptionPage(@Param("param") Map<String, Object> map, @Param("pageNum")int pageNum, @Param("pageSize") int pageSize);


    /**
     * 获取所有得围栏异常得车辆id集合
     * @return
     */
    public List<Integer> getAllCarId();
}